<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Document Providers</title>
<style type="text/css">@import url("file:/home/moovida/rcpdevelopment/eclipse/configuration/org.eclipse.osgi/bundles/488/1/.cp/book.css");</style>
<style type="text/css">@import url("file:/home/moovida/rcpdevelopment/eclipse/configuration/org.eclipse.osgi/bundles/505/1/.cp/schema.css");</style>
</HEAD>
<BODY>
<H1 style="text-align:center">Document Providers</H1>
<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.ui.editors.documentProviders<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>3.0 (originally named org.eclipse.ui.documentProviders)
<p></p>

<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>This extension point is used to define mappings between file types and document providers or between types of editor inputs and document providers that can be used by editors. Document providers must implement the interface <samp>org.eclipse.ui.texteditor.IDocumentProvider</samp>. Editor inputs must be instance of <samp>org.eclipse.ui.IEditorInput</samp>.<p></p>
<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
<p></p>
<p class="code SchemaDtd">&lt;!ELEMENT <a name="e.extension">extension</a> (<a href="#e.provider">provider</a>+)&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST extension</p>
<p class="code SchemaDtdAttlist">point&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name&nbsp;&nbsp;CDATA #IMPLIED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>point</b> - a fully qualified identifier of the target extension point</li>
<li><b>id</b> - an optional identifier of the extension instance</li>
<li><b>name</b> - an optional name of the extension instance</li>
</ul>
<br><p class="code SchemaDtd">&lt;!ELEMENT <a name="e.provider">provider</a> EMPTY&gt;</p>
<p class="code SchemaDtd">&lt;!ATTLIST provider</p>
<p class="code SchemaDtdAttlist">extensions&nbsp;CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">inputTypes&nbsp;CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</p>&gt;</p>
<p></p>
<ul class="ConfigMarkupAttlistDesc">
<li><b>extensions</b> - a comma separated  list of file extensions</li>
<li><b>inputTypes</b> - a comma separated list of qualified editor input class names</li>
<li><b>class</b> - the qualified name of the document provider class</li>
<li><b>id</b> - the unique id of this provider</li>
</ul>
<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6><pre class="Example"><span class="code SchemaTag">
&lt;extension point=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.editors.documentProviders&quot;</span><span class="code SchemaTag">&gt; 
    &lt;provider 
        extensions=</span><span class="code SchemaCstring">&quot;jav&quot;</span><span class="code SchemaTag"> 
        class=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.examples.javaeditor.JavaDocumentProvider&quot;</span><span class="code SchemaTag"> 
        id=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.examples.javaeditor.JavaDocumentProvider&quot;</span><span class="code SchemaTag">&gt; 
    &lt;/provider&gt; 
&lt;/extension&gt; 
</span></pre>
<p>
This example registers <samp>org.eclipse.ui.examples.javaeditor.JavaDocumentProvider</samp> as the default provider for files with the extension ".jav". 
</p>
<p>
<pre class="Example"><span class="code SchemaTag">
&lt;extension point=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.editors.documentProviders&quot;</span><span class="code SchemaTag">&gt; 
    &lt;provider 
        inputTypes=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.IStorageEditorInput&quot;</span><span class="code SchemaTag"> 
        class=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.editors.text.FileDocumentProvider&quot;</span><span class="code SchemaTag"> 
        id=</span><span class="code SchemaCstring">&quot;org.eclipse.ui.editors.text.FileDocumentProvider&quot;</span><span class="code SchemaTag">&gt; 
    &lt;/provider&gt; 
&lt;/extension&gt; 
</span></pre>
</p>
This example registers <samp>org.eclipse.ui.editors.text.FileDocumentProvider</samp> as the default provider for all editor inputs that are <samp>instance of org.eclipse.ui.IStorageEditorInput</samp>.
<p></p>

<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>Document providers registered for a file extension have precedence over those registered for input types. Document providers must implement the interface <samp>org.eclipse.ui.texteditor.IDocumentProvider</samp>. Editor inputs must be instance of <samp>org.eclipse.ui.IEditorInput</samp>.
<p></p>

<br>
<p class="note SchemaCopyright">
Copyright (c) 2001, 2009 IBM Corporation and others.<br>
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>

</p>
</BODY>
</HTML>
